<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlertColumnsInUserWithdrawsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_withdraws', function (Blueprint $table) {
            $table->dropColumn('before_coins');
            $table->dropColumn('after_coins');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user_withdraws', function (Blueprint $table) {
            $table->bigInteger('before_coins')
                ->default(0)
                ->comment('变动前金币数量');
            $table->bigInteger('after_coins')
                ->default(0)
                ->comment('变动后金币数量');
        });
    }
}
